-- card: 3051 from stack: in.0 -- bmap block id: 0 -- flags: 0000 -- background id: 2670 -- name: -- part 4 (button) -- low flags: 00 -- high flags: A004 -- rect: left=318 top=306 right=328 bottom=418 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Show Script ----- HyperTalk script ----- on mouseUp edit the script of btn "Try It" end mouseUp -- part 5 (button) -- low flags: 00 -- high flags: A004 -- rect: left=94 top=306 right=328 bottom=194 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Try It ----- HyperTalk script ----- •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• on showMessage string1,string2 --©1988 by Dean H. Wette put return & string1 & return & string2 into fld Textframe lock screen show bg fld "Frame1" show bg fld "Frame2" show bg fld "TextFrame" unlock screen end showMessage on hideMessage --©1988 by Dean H. Wette lock screen hide bg fld "Frame1" hide bg fld "Frame2" hide bg fld "TextFrame" unlock screen put empty into bg fld "TextFrame" --Don't leave the text hanging end hideMessage --around; that would be sloppy   --and, potentially, a great waste   --of space. Really simple, huh? •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• This is the script of the ‘Try It’ button. Take a look at the openStack handler also... on mouseUp hide cd fld about showMessage "Doing something for a while.","Please wait..." repeat 100 set cursor to busy end repeat set cursor to hand hideMessage end mouseUp ———————————————————————————————————————————————————————————————————————— -- part 6 (field) -- low flags: 81 -- high flags: 0002 -- rect: left=28 top=54 right=293 bottom=488 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: about ----- HyperTalk script ----- on mouseUp hide cd fld about end mouseUp -- part 8 (button) -- low flags: 00 -- high flags: 2000 -- rect: left=468 top=19 right=56 bottom=507 -- title width / last selected line: 0 -- icon id / first selected line: 14767 / 14767 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: New Button ----- HyperTalk script ----- on mouseUp if the visible of cd fld about is true then hide cd fld about else showMessage "Who came up with this?","Click the mouse to find out..." wait until the mouseClick hideMessage show cd fld about end if end mouseUp -- part contents for card part 6 ----- text ----- ShowMessage is Copyright ©1988 by Dean H. Wette, All rights reserved. There's no charge for ShowMessage, but if you use it, please credit me for its use in your stack. I'd also appreciate any comments you might have:     Dean H. Wette     921 DeMun Ave. 2N     Clayton, MO 63105 EMail to:     CI$ — 72317,2034 [Dean Wette]     XBank BBS (415-426-8972) — Dean Wette     MacNET — address forthcoming     FIDONet — Opus1: 100/255 Look for my other utility “ChangeObjectLayer” and my record cataloger stack “ALBUMS” on CI$, XBank, and MacNET. -- part contents for background part 4 ----- text ----- ••••••••••••••••••••••••••••• SHOWMESSAGE 1.0 ••••••••••••••••••••••••• ———————————————————————————————————————————————— Who said utility documentation stacks had to be pretty? ———————————————————————————————————————————————— Currently, there are two standard methods of displaying a message to the user in HyperCard without using external code: the message box and the answer dialog. However, the message box is terribly ugly, especially when you have put a lot of work into an elegent graphic interface. The answer dialog isn't always appropriate because it requires a user response, and it disappears before a script can continue to execute. Often what's needed is an elegent way of displaying a message, and the ability to control both invoking and hiding the message from within a script. My solution is ShowMessage. ShowMessage allows you to control both the display and disposal of a message window from within a script. This is accomplished entirely using HyperCard objects and HyperTalk--no externals are required. Once ShowMessage is set up in a stack, it's very easy to use. The syntax for ShowMessage is: --display the message showMessage [<,string2>] --hide the message hideMessage So for example, if you want to display a message during the course of a lengthy script execution, you would do something like this: on mouseUp showMessage "Doing something for a while.","Please wait..." --do something like...compact the stack...or sort all cards --when the process is finished hideMessage end mouseUp Go ahead, try it out! If your script has a repeat loop, you can also 'set the cursor to busy' as a further indication that something is going on (and that the computer hasn't hung up). Preparing ShowMessage for use is easy. First of all, put the showMessage and hideMessage handlers in your stack script. Secondly, create the message window using three background fields: one for the outside part of the frame and two for the inside part. Name them (in order from back to front) Frame1, Frame2, and TextFrame. Of course, you can name them what you want, but be sure to change the handlers to reflect any other names. Since you're a HC developer, I'll leave it to you to worry about adjusting the size of the window, and making sure the text looks right when it's displayed. One word of warning though. If you have other buttons and fields in your stack, make sure the ShowMessage window appears on top of them (use 'Bring Forward' and 'Send Farther', or better yet, get my utility SetLayer a.k.a. ChangeObjectLayer). If you're using card buttons and fields in your stack, you may need to construct the ShowMessage window from card fields (thus making it card specific). If need be, you can have several sets of ShowMessage handlers and windows for cards and backgrounds, or for different size windows. For Example: showMessage1 string1,string2 showMessage2 string1, string2 etc... Just make the necessary modifications to the handlers. You're the developer! Use your imagination. But please remember, the concept and original handlers for ShowMessage came from me, so credit me if you use them. Thanks. One final note: if the user aborts your script by typing Command-., you need to dispose of the window in an idle handler: on idle if the visible of fld "TextFrame" is true then hideMessage end idle Of course, all this would be simpler in an XCMD., but no one has done it, and I'm not a programmer.